[#ftl]
[#include "commonDef.ftl" /]
[#-- 一些固定逻辑方法,该页面以查询方法f_query为主设计的; toggleFlag扩展了两个功能联动 --]
[#assign f_add="add" f_edit="edit" f_query="page" f_detail="detail" f_del="del" f_req="req" f_res="res"/]
[#assign qmdx=map_method[f_query]  toggleFlag=(data_main.fieldEx['toggleFlag']!'') 
 to = '' data_main2='' data_method2='' qmdx2=''/]
[#if other?? && toggleFlag?length>0]
[#assign to=other[toggleFlag]  data_main2=to.data_main  data_method2=to.data_method map_method2=to.map_method qmdx2 = map_method2[f_query] /]
[/#if]
CurrentDictNames = {};
ccJSON ={
  [#if toggleFlag?length>0]
    TableToggleFlag: true //默认开启联动
  , TableSelectFlag: null //选中行唯一ID
  , TableSelectParam: null //选中行参数[/#if]
};
${DlgTitleConstFunc(data_main)}="${data_main.moduleKeyName}";
[#if toggleFlag?length>0]
${DlgTitleConstFunc(data_main2)}="${data_main2.moduleKeyName}";
[/#if]
$(function(){
[#assign loadDict=data_main.loadDict!'' loadDict2=(toggleFlag?length>0)?then(data_main2.loadDict!'','')]
[#if toggleFlag?length>0 && loadDict2?length>0]
[#assign loadDict = (loadDict?length>0)?then(loadDict+','+loadDict2,loadDict2) /]
[/#if]
[#if loadDict?length>0]
    //加载字典
    zUtil.dictLoadSyncOf${(data_main.loadDictFunc!'sys')?cap_first}("${loadDict}");
[/#if]
    [#if toggleFlag?length>0]
    //切换表格显示
    toggleTable();
    [/#if]
    //查询表格加载
    ${TableMethodNameFunc(data_main,qmdx)}();//${data_main.moduleKeyName+"-"+qmdx.methodKeyName}
    [#if toggleFlag?length>0]
    ${TableMethodNameFunc(data_main2,qmdx2)}();//${data_main2.moduleKeyName+"-"+qmdx2.methodKeyName}
    [/#if]
    
    [#if loadDict?length>0]
    //字典选项加载
    [@DictArrHandler data_main data_method/]
    [#if toggleFlag?length>0]
    [@DictArrHandler data_main2 data_method2/]
    [/#if]
    [/#if]
});
[#if toggleFlag?length>0]
[@JsToggleHandler /]
[/#if]
/* --分割--${module_title}---------------------------------------------------------------------------- */
[@JsMethodHandler data_main  data_method  map_method  true /]
[#if toggleFlag?length>0]
/* --分割--${module_title}---------------------------------------------------------------------------- */
[@JsMethodHandler data_main2  data_method2  map_method2  false /]
[/#if]
